package com.sxyjhh.service.data_exchange;

import com.sxyjhh.create.api.DataApi;
import com.sxyjhh.dbutil.basic.ConstConfig;
import com.sxyjhh.dbutil.basic.DBQueryUtils;
import com.sxyjhh.dbutil.utils.DBInfoUtil;
import com.sxyjhh.schedule.TaskRunnable;

import java.sql.SQLException;

/**
 * Created by Administrator on 2018/6/19.
 */
public class DeleteDataRunnable extends TaskRunnable {

    private DataExchangeService dataExchangeService;
    private String tabName;
    private String key;
    private DataApi ri;


    public DeleteDataRunnable(DataExchangeService dataExchangeService,
                              String tabName, String key, DataApi ri) {
        this.taskId = tabName;
        this.dataExchangeService = dataExchangeService;
        this.key = key;
        this.tabName = tabName;
        this.ri = ri;
    }


    @Override
    public void run() {
        ConstConfig.DBType dbType = ConstConfig.DBType.valueOf(Integer.valueOf("3"));
        DBQueryUtils dbQueryUtils = new DBQueryUtils(DBInfoUtil.getDBDriverName(dbType),
                "jdbc:mysql://192.168.2.201:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useInformationSchema=true&useSSL=false",
                "root", "Yun123456789/", 1);

        //dataExchangeService.dataCompareDel(tabName,tabName, dbQueryUtils, ri, key,"");
    }
}
